home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / apps / 284 / applic / stgizmo.doc < prev    next >
Text File  |  1988-08-18  |  16KB  |  310 lines

  1.  
  2.            This is the .ARC file containing the graphics program
  3.  
  4.                                 ST GIZMO 
  5.  
  6.            By
  7.  
  8.                             Helge Skjeveland
  9.                             1466 S. Main
  10.                             Orem, UT 84058-7482
  11.                             Tel.:  (801)224-8483.
  12.  
  13.  
  14.            This program is not freeware, but SHAREware.  I am asking
  15.            for $10 if you keep this program for subsequent use.  
  16.            Commented LDW BASIC source code and a detailed explanation
  17.            (implementation notes) are available for an additional $15.
  18.  
  19.            This .ARC file may be freely distributed via any BBS, or
  20.            via diskette.  Please keep this README.DOC and STGIZMAN.DOC
  21.            with STGIZMO.PRG so that others may have the documentation
  22.            and I get the $10 from the kind souls who believe in paying
  23.            for what they use.  Thanks.
  24.  
  25. --------------------------------------------------------------------------------
  26.  
  27.                              ST GIZMO MANUAL
  28.  
  29.  
  30.  
  31. ST GIZMO is a graphic-generating program.  It will allow you to create 
  32. many interesting designs.  It is designed to allow you to take a snapshot 
  33. (e.g., using SNAPSHOT.ACC, which is available with the GST's 1ST WORD PLUS) 
  34. of the screen, whence you can integrate the designs with your graphics pack-
  35. ages.  It is a fully implemented GEM application (GEM is a trademark of 
  36. Digital Research, Inc.).  The following combined manual and tutorial will 
  37. both enable you to use the product and explain the theory behind it.  
  38.  
  39. If you're like the author, you won't even read the instructions, but just
  40. forge ahead and experiment, which is OK, since you can't damage the com-
  41. puter or program by doing so; however, this is not a long manual, so when
  42. you're through, come back and read through it:  You will get far more 
  43. pleasure out of the money you paid if you do so.  The program is, for your
  44. convenience, not copy protected; but please, don't pirate it.  I earn my
  45. living programming, and I am just as poor as most of you out there.  To
  46. you 99% who paid for this program, thanks.  I have tested this program
  47. thoroughly, but if you find any problems, drop me a note, and I'll fix it.
  48.  
  49. Enjoy!!
  50.  
  51. Let's try ST GIZMO out:  Invoke STGIZMO (by clicking on the STGIZMO.PRG 
  52. icon.  You will see a dialog box appear that has various fields.  For now, 
  53. just click on DONE (or hit RETURN -- as with all GEM buttons, if it has a 
  54. thick border, striking RETURN will select it, just as if you clicked on it 
  55. [this is called a "radio button"]).  Then click on OK (strike RETURN) when 
  56. the TERMINATE DIALOG alert box appears.  You will now see the rotating 
  57. heptagram (seven-pointed star) default pattern.  Interesting and beautiful
  58. patterns like this are easy to generate with ST GIZMO.  Now click on the 
  59. close box in the upper left corner of the window, or select **QUIT** from 
  60. the FUNCTIONS menu, and answer YES to the alert box.  You are now back at 
  61. the Data Entry dialog box.  You can exit the program from here by clicking
  62. on the EXIT box.  Since this has a skinny border, you can only exit by 
  63. deliberately selecting it (a safety feature).
  64.  
  65. ST GIZMO is driven by parametric equations in two dimensions.  What this 
  66. means is that there are two oscillating functions, one in the vertical, 
  67. the other in the horizontal.  By modifying their initial size (scale), 
  68. decay rate, period, and phase it is possible to generate many interesting
  69. patterns.  By intelligently selecting the increment and choosing either 
  70. draw or plot mode it is possible to vastly increase the number and variety
  71. of generatable patterns.  ST GIZMO is compatible with all three ST reso-
  72. lutions, but make sure that if you are going to incorporate your ST GIZMO 
  73. pattern with a preexistent graphic that you use the same resolution for 
  74. both the pattern and graphic (you cannot mix resolutions -- it's like 
  75. cramming a square peg into a round hole . . . it won't work).  
  76.  
  77. For the purpose of the following examples, set the DECAY to a huge number,
  78. say, 16E11 (one point six trillion, the national debt).  This will prevent
  79. the figure from shrinking while it draws, so that the actions will be clear.
  80.  
  81. On to the instructions:
  82.  
  83.   The Data Entry dialog box functions are:
  84.  
  85.      X:Y period ratio -- this determines how many times an oscillation
  86.                          in one direction (X=horizontal) will occur for
  87.                          an oscillation in the other direction (Y=verti-
  88.                          cal).  If you use 1:1, a phase angle 90 degrees,
  89.                          and a small increment, you will get  a circle.
  90.                          This is because sin(t + 90)=cos(t), so you get
  91.                          the parametric equation
  92.                   
  93.                              /x=sin(t)
  94.                              \y=cos(t),
  95.  
  96.                          a circle.
  97.  
  98.      phase (phi)      -- If you change the phase to 0, then you have the
  99.                          parametric equation
  100.  
  101.                              /x=sin(t)
  102.                              \y-sin(t).
  103.    
  104.                          Since x and y are doing the same thing, you get
  105.                          an unexciting diagonal line.
  106.  
  107.                          If you use phase=45, then you get a nice ellipse
  108.                          with aspect ratio 2:1 (since 90:45=2:1).  To get
  109.                          an ellipse of aspect 3:1, use 30 degrees (90:30=
  110.                          3:1), and so on.
  111.  
  112.      increment (theta)-- This specifies how big the angle increment you 
  113.                          want STGIZMO to increase by each time it draws or
  114.                          plots.  If you use phase 90 and 1:1 ratio and use
  115.                          a small increment (say, five degrees), then you
  116.                          will get what appears to be a circle; but since a
  117.                          circle is a continuous set of points equidistant
  118.                          from the center, and a computer can only deal in
  119.                          fixed increments, you are really generating a
  120.                          polygon of 72 sides (but THAT many sides LOOKS
  121.                          like a circle).  If you choose an increment of
  122.                          90, you will get a diamond (rhombus).  This is,
  123.                          of course, a polygon of four sides.  
  124.  
  125.                            120 generates an equilateral triangle, since
  126.                          360/120=3.
  127.  
  128.                            To get a pentagon, use 72 degrees (360/5=72).  
  129.  
  130.                            Now try something interesting:  use 144 degrees 
  131.                          (144 = 2 x 72).  You now have a five-pointed star, 
  132.                          a pentagram.  This results because you are SKIPPING 
  133.                          every other vertex that would've resulted if you used
  134.                          72 degrees (for, 144 = 2 x 72, see?).  
  135.  
  136.                            The increment for the heptagon (seven-sided polygon)
  137.                          is 51.4285 (~360/7).  
  138.  
  139.                          Note that all the seven-sided figures will appear to
  140.                          rotate slightly because seven will not divide evenly
  141.                          into 360.  If you want them to be more stable, use a
  142.                          calculator (desk accessory or hand-held) to get a more
  143.                          precise value for the increment(s), up to the maximum
  144.                          the field size will allow.
  145.                          
  146.                            There is only one possible pentagram, but there are 
  147.                          TWO possible unique heptagrams:
  148.  
  149.                                  one uses the increment 102.8571 (2 x 51.4285), 
  150.                                and skips every OTHER vertex;
  151.  
  152.                                  the other uses 153.257 (3 x 51.4285), 
  153.                                and skips TWO vertices each time.
  154.                            
  155.                            The nonagon (nine sides) is generated by 360/9=40.
  156.  
  157.                            There are three possible nonagrams (enneagrams), 
  158.                          two of which can be generated by STGIZMO:
  159.  
  160.                                  80, where every other vertex of the nonagon is 
  161.                                skipped; and 
  162.                                  160, where FOUR vertices are skipped.
  163.  
  164.                            The remaining one is 120, which would be three inter-
  165.                          laced equilateral triangles (3 x 3 = 9).  Since the
  166.                          computer can't draw these without "lifting its pen up,"
  167.                          as it were, we can't directly generate it.  If you want
  168.                          to, make and snapshot the three separate triangles, 
  169.                          then overlay them onto each other in a graphics pack-
  170.                          age using transparent mode.
  171.  
  172.                            If the number of vertices is not a prime number, 
  173.                          there will still be polygrams, but some will consist 
  174.                          of interlaced polygons (i.e., nine can be factored 
  175.                          into 3 x 3 -- three interlaced equilateral triangles).
  176.                            Another interesting example of this is the octagram 
  177.                          (8 sides):
  178.  
  179.                            An octagon is generated by the increment 45 degrees.
  180.  
  181.                            Of course, you will remember that 2 x 45 = 90 degrees
  182.                          generated a rhombus.  That octagram is an interlaced
  183.                          rhombus and square, thusly (crude):                         
  184.   
  185.                                                   /\
  186.                                                --------
  187.                                                |/    \|
  188.                                               /|      |\
  189.                                               \|      |/
  190.                                                |\    /|
  191.                                                --------
  192.                                                   \/
  193.  
  194.  
  195.                          Since two divides evenly into eight, we have two 
  196.                          distinct, interlaced polygons.  You can make this by 
  197.                          snapshot/overlay techniques, too.  
  198.                            A continuous octagram is generated by using 3 x 45,
  199.                          which is 135 degrees, since 3 doesn't divide evenly
  200.                          into 8.
  201.  
  202.                            Happy exploring!
  203.  
  204.  
  205.      decay rate (delta)--The larger the decay rate, the slower the decay.
  206.                          We set this to 16E11 (one point six trillion), which
  207.                          makes for imperceptible shrinkage.  If you use, say,
  208.                          500 (as in the default heptagram), the figure will
  209.                          slowly shrink.  If you use an angular increment that
  210.                          is slightly smaller or larger than will evenly divide
  211.                          into 360, then the polygon or polygram will shrink and
  212.                          rotate simultaneously, generating beautiful patterns
  213.                          (especially for you fortunate monochrome monitor 
  214.                          owners!).  
  215.  
  216.      draw scale (sigma)--100% means full size, but if you want it smaller, you
  217.                          can shrink its initial size, and it will shrink far-
  218.                          ther from that point.  You can also specify a larger 
  219.                          size than the full window (>100%): the pattern will be 
  220.                          clipped and shrink until it becomes visible, and thence
  221.                          shrink as far as you desire.  If you make the scale
  222.                          too large, you may not be able to see the pattern for
  223.                          a while, because the screen will be smaller than the
  224.                          central hole!  If your decay rate is set small enough,
  225.                          and you wait, though, the pattern will eventually 
  226.                          show itself.
  227.  
  228.      DRAW button       --A line is drawn between successive positions.
  229.  
  230.      PLOT button       --Each successive position is plotted only.
  231.  
  232.      DONE radio button --Terminate the dialog and go to display mode.
  233.  
  234.      EXIT button       --**QUIT** ST GIZMO
  235.  
  236. DISPLAY MODE:
  237.  
  238.      In this mode the mouse arrow will eventually become invisible if you do not
  239.      move it; however, moving it at all makes it reappear.  
  240.  
  241.      CLOSE BOX (upper left-hand corner of the window):  clicking here is the
  242.                same as clicking on the **QUIT** menu option.
  243.  
  244.      WINDOW TITLE BAR:  Indicates display attributes (drawing, plotting, or
  245.                         paused)
  246.  
  247.      MENUS:  The menu becomes available the first time you run a pattern dis-
  248.              play.
  249.  
  250.        ATARI/DESK--
  251.  
  252.          ABOUT STGIZMO --program author's info
  253.  
  254.          DESK ACCESS   --You can invoke desk accessories here.  You can, for 
  255.                          example, use a calculator accessory to find the values
  256.                          to experiment with for entry into the dialog box; or
  257.                          you can take snapshots of a pattern for use with a
  258.                          graphics package, desktop publishing, etc.
  259.  
  260.               ***NOTE:   WHEN YOUR MOUSE LEAVES THE DISPLAY WINDOW, THE PROGRAM
  261.                          WILL BE PAUSED.  FOR YOUR CONVENIENCE IT IS LEFT TO YOU
  262.                          TO RESTART IT, IF DESIRED.  TO DO SO, CLICK ON PAUSE 
  263.                          IN THE MENU TO TOGGLE THE DISPLAY ACTIVITY ON AGAIN.
  264.  
  265.        FUNCTIONS --  
  266.  
  267.           PAUSE         --automatically activated if your mouse pointer leaves
  268.                          the display window.  Click on it to resume drawing.
  269.  
  270.          RERUN         --erases the pattern and re-runs it.  If nothing happens,
  271.                          remember to check that PAUSE is not on (window title 
  272.                          and checked PAUSE menu entry).
  273.  
  274.          **QUIT**      --asks you "ARE YOU SURE?", if so, click on YES or press
  275.                          RETURN to access the Data Entry dialog.  If you want
  276.                          to terminate ST GIZMO altogether, click on the EXIT 
  277.                          button in the Data Entry dialog:  That is the only
  278.                          EXIT point.  You can also **QUIT** to the dialog box
  279.                          by clicking on the window's close box (upper left
  280.                          corner).
  281.  
  282.  
  283.   More about patterns:
  284.  
  285.     If you use other than 1:1 in the ratio fields, you will get complex patterns
  286.   called Lissajous patterns (after the Frenchman who first studied them).  
  287.   1:2 will give a portion of a parabola, 2:1 will give the same rotated 90 de-
  288.   grees.  Using various increments with Lissajous patterns and PLOT mode will
  289.   create VERY slow but gorgeous patterns that have a three-dimensional appear-
  290.   ance.  For example, try
  291.  
  292.                     ratio 1:2
  293.                     phase 90
  294.                     increment 153
  295.                     decay 3000
  296.                     scale 100
  297.                     PLOT mode
  298.  
  299.                  or ratio 101:100
  300.                     phase 90
  301.                     increment 2
  302.                     decay 16e11
  303.                     scale 100
  304.                     DRAW mode
  305.              
  306.   and don't stay up all night! (I did, sometimes, while making STGIZMO)
  307.  
  308.  
  309. *** END OF FILE ***
  310.